{include file="../../../application/admin/view/public/head" /}


<div class="">

    <div class="layui-card">
        {if condition="$param.select neq 1"}
        <div class="layui-card-body">
            <form class="layui-form"  method="post" action="{:url('data')}">
                <input type="hidden" value="{$param.select}" name="select">
                <input type="hidden" value="{$param.input}" name="input">
                <div class="layui-form-item">
                    <div class="layui-form-item layui-inline">
                        <select name="type">
                            <option value="">{:lang('select_type')}</option>
                            <option value="image" {if condition="$param['type'] eq 'image'"}selected {/if}>image</option>
                            <option value="media" {if condition="$param['type'] eq 'media'"}selected {/if}>media</option>
                            <option value="file" {if condition="$param['type'] eq 'file'"}selected {/if}>file</option>
                        </select>
                    </div>
                    <div class="layui-form-item layui-inline">
                        <select name="order">
                            <option value="">{:lang('select_sort')}</option>
                            <option value="annex_time" {if condition="$param['order'] eq 'annex_time'"}selected{/if}>{:lang('update_time')}</option>
                            <option value="annex_id" {if condition="$param['order'] eq 'annex_id'"}selected{/if}>{:lang('id')}</option>
                            <option value="annex_hits" {if condition="$param['order'] eq 'annex_size'"}selected{/if}>{:lang('file_size')}</option>
                        </select>
                    </div>
                    <div class="layui-form-item layui-inline">
                        <input type="text" autocomplete="off" placeholder="{:lang('wd')}" class="layui-input" name="wd" value="{$param['wd']}">
                    </div>
                    <div class="layui-form-item layui-inline">
                        
                    </div>
                    <div class="layui-form-item layui-inline">
                        
                    </div>
                    <div class="layui-form-item layui-inline">
                        
                    </div>
                    
                    <div class="layui-form-item layui-inline">
                        <button class="pear-btn pear-btn-md pear-btn-primary j-search">
                            <i class="layui-icon layui-icon-search"></i>
                            {:lang('btn_search')}
                        </button>
                    </div>
                </div>
            </form>
        </div>
        {/if}
    </div>
  
    <div class="layui-card">
        <div class="layui-card-body">
          <table id="role-table" lay-filter="role-table"></table>
          <div
            class="layui-form layui-border-box layui-table-view"
            lay-filter="LAY-table-1"
            lay-id="role-table"
            style=""
          >
            <div class="layui-table-tool">
              <div class="layui-table-tool-temp">
                <a data-href="{:url('del')}" class="pear-btn pear-btn-danger pear-btn-md j-page-btns confirm"><i class="layui-icon">&#xe640;</i>{:lang('del')}</a>
                <a href="{:url('file')}" class="pear-btn pear-btn-primary pear-btn-md "><i class="layui-icon">&#xe620;</i>{:lang('admin/annex/dir_model')}</a>
                <a class="pear-btn pear-btn-primary pear-btn-md j-iframe" data-href="{:url('annex/check')}" href="javascript:;" title="{:lang('admin/annex/check')}"><i class="layui-icon">&#xe620;</i>{:lang('admin/annex/check')}</a>
                <a href="{:url('init')}" class="pear-btn pear-btn-primary pear-btn-md "><i class="layui-icon">&#xe620;</i>{:lang('admin/annex/init_data')}</a>
              </div>
            </div>
            <div class="layui-table-box">
              <div class="layui-table-header">
        <form class="layui-form" method="post" id="pageListForm" >
          <table
          cellspacing="0"
          cellpadding="0"
          border="0"
          class="layui-table"
          lay-skin="line"
          >
          <thead>
            <tr>
                <th width="25"><input type="checkbox" lay-skin="primary" lay-filter="allChoose"></th>
                <th width="50">{:lang('id')}</th>
                <th width="150">{:lang('file_size')}</th>
                <th width="150">{:lang('type')}</th>
                <th width="150">{:lang('update_time')}</th>
                <th >{:lang('file_name')}</th>
            </tr>
          </thead>
          <tbody>
            {volist name="list" id="vo"}
            <tr>
                <td><input type="checkbox" name="ids[]" value="{$vo.annex_id}" class="layui-checkbox checkbox-ids" lay-skin="primary"></td>
                <td>{$vo.annex_id}</td>
                <td>{:round($vo['annex_size']/1024, 2)}K</td>
                <td>{$vo.annex_type|htmlspecialchars}</td>
                <td>{$vo.annex_time|mac_day='color'}</td>
                <td><a target="_blank" class="layui-badge-rim " href="{php}echo MAC_PATH;{/php}{$vo.annex_file}">{$vo.annex_file}</a></td>
            </tr>
            {/volist}
          </tbody>
          </table>
        </form>
              </div>
              
            </div>
            
            
          </div>
        </div>
      </div>
      
    <div id="pages" class="center"></div>
  </div>



{include file="../../../application/admin/view/public/foot" /}

<script type="text/javascript">
    var curUrl="{:url('annex/data',$param)}";
    layui.use(['laypage', 'layer','form'], function() {
        var laypage = layui.laypage
                , layer = layui.layer,
                form = layui.form;

        laypage.render({
            elem: 'pages'
            ,count: {$total}
            ,limit: {$limit}
            ,curr: {$page}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj,first){
                if(!first){
                    location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
                }
            }
        });


    });
</script>
</body>
</html>